#include "DataManager.hpp"
#include "DataType.hpp"

const std::string&		DataManager::DataManager::getName() const
{
	return this -> _dataName;
}

unsigned int			DataManager::addType(std::string typeName)
{
	unsigned int		seqSize = this -> _dataSeq.size();
	
	this -> _dataSeq.insert( std::pair<unsigned int, DataType*>(seqSize, new DataType(seqSize, typeName)) );
	return seqSize;
}

DataType*			DataManager::getType(unsigned int id) const
{
	return this -> _dataSeq.find(id)->second;
}

unsigned int			DataManager::getTypesCount() const
{
	return this -> _dataSeq.size();
}

DataManager::DataManager(std::string name) : _dataName(name)
{

}
